Recently, with development of high-density optical discs, the optical discs have been used increasingly as recording media for digital images including moving images. The application fields of the optical discs are so wide that they are utilized not only as peripheral equipment of a computer but also in a video player for home use. In the future, it is anticipated that the optical discs will be used as recording media for video recording to replace tape media.
In order to deal with data in common in such a wide application area, data is managed usually in the logical unit of a file. As one of such file management methods, a file system in a format according to the Universal Disk Format (UDF) specification is available.
The UDF specification acts to ensure the medium compatibility among various operating systems (OS) for computers, and also is employed in a DVD video player for consumer appliances. This specification is one of the file formats that is expected to be applied in a wider variety of platforms in the future.
The following describes a file management method using a format according to the UDF specification, with reference to a drawing. FIG. 23 shows an example of the construction of a data recording/reproducing apparatus to which a conventional file management method is applied.
In FIG. 23, numeral 101 denotes a disc such as an optical magnetic disc. Numeral 102 denotes a recording medium driving unit, and in the case of the disc 101 being an optical magnetic disc, this unit is composed of a spindle motor or the like. Numeral 103 denotes a recording/reproducing unit, and in the case of the disc 101 being an optical magnetic disc, this unit is composed of an optical pickup, a magnetic head, a servo circuit, a modulation demodulation circuit and the like.
In addition, numeral 104 denotes a memory unit, which stores data temporarily at the time of recording/reproducing data. Numeral 105 denotes a disc driving unit, and is composed of the disc 101, the recording medium driving unit 102, the recording/reproducing unit 103 and the memory unit 104.
Further, numeral 106 denotes an AV signal processing unit, which carries out processing such as MPEG compression with respect to an AV input signal input from a CCD camera or the like, and MPEG decompression with respect to AV data read from the disc 101 to output to a monitor or the like. Numeral 107 denotes a system control unit, which controls the AV signal processing unit 106 and the disc driving unit 105.
In the data recording/reproducing apparatus constructed in this way, at the time of recording data, an AV signal input into the AV signal processing unit 106 is subjected to image compression processing according to the MPEG method or the like, and then is transferred to the memory unit 104 in the control of the system control unit 107.
Next, the recording medium driving unit 102 and the recording/reproducing unit 103 operate in the control of the system control unit 107 so that data in the memory unit 104 is recorded on the disc 101.
At the time of reproducing data, the recording medium driving unit 102 and the recording/reproducing unit 103 operate in the control of the system control unit 107 so that data recorded in the disc 101 is transferred to the memory unit 104.
Next, in the control of the system control unit 107, data is read from the memory unit 104 and the AV signal processing unit 106 outputs the data as an AV signal.
The following describes an example of a structure of the UDF file system that is a conventional file management method, with reference to a drawing. FIG. 24 shows a structure of a volume space of the UDF constructed in the disc 101. In FIG. 24, in order to manage the disc 101 as a logical volume, the disc 101 is divided into a unit called a sector, and logical sector numbers (LSN) from 0 to the Last LSN are assigned to the sectors. Also, at the beginning and the termination of the volume space, volume structures are recorded. Further, between these volume structures, a partition space for recording structure information on a file and a file as user data is allocated.
In the partition space, logical block numbers (LBN) from 0 to the Last LBN are assigned to each sector beginning from the leading sector. FIG. 25 shows the structure of the partition space when the directory structure shown in FIG. 26 is recorded on the disc 101 (it should be noted that the following description refers to parameters specified in the DVD-RAM standard).
In FIG. 26, a directory DIR1 is present under the ROOT directory, and FILE1_1 and FILE 1_2 are present under the DIR1. In this state, in FIG. 25, a space bitmap descriptor is recorded at LBN=0 to 79.
The space bit map descriptor has a space bitmap indicating whether each logical block can be allocated or not. Each bit in the space bitmap corresponds to each logical block, where this bit value of “1” means an unallocated state of the logical block, and “0” means an allocated state.
At LBN=80, a file set descriptor is recorded. In the file set descriptor, location information on a file entry in the ROOT directory is recorded. The file entry will be described later in detail.
At LBN=81, a terminating descriptor is recorded. The terminating descriptor represents a termination of the file set descriptor.
At LBN=82, the file entry of the ROOT directory is recorded. The file entry is used for storing various attribute information specific to each file, information concerning a time stamp, a recorded location of the file, the size of the file and the like and for managing the file as a group of extents. The extent will be described later in detail.
FIG. 27 is an example of a structure of the file entry. In FIG. 27, at a descriptor tag field, information for discriminating among various descriptors such as a space bitmap descriptor, a file set descriptor and a file entry in the partition space is recorded. In the case of the file entry, it is specified to describe a value “261”. At an information control block (ICB) tag field, attribute information concerning the file entry itself is recorded. An extended attribute field is used for describing the attribute information other than that specified in the attribute information field in the file entry. At an allocation descriptor field, allocation descriptors are recorded in a required number for managing a contiguous area of logical blocks as one extent.
FIG. 28 shows a structure of the allocation descriptor. In the allocation descriptor, an extent is represented by the extent length and the extent location.
FIG. 29 shows an interpretation on the upper 2 bits in the extent length included in the allocation descriptor. The upper 2 bits represent an allocation state and a recording state of the extent.
The value of “0” represents an allocated and recorded extent, and data of the file is recorded. The value of “1” represents an allocated and not recorded extent, and the area is allocated to a specific file/directory but the data is not recorded therein. The value of “2” represents an unallocated and not recorded extent, where no data is recorded. The value of “3” represents an extent continuing from the allocation descriptor. At the allocation descriptor field in a file entry, a plurality of allocation descriptors can be recorded, so that one file is constructed by a group of extents managed with these allocation descriptors.
In the directory, a filename of a file included in the directory and location information on the file entry are recorded. According to the UDF, a directory is one type of files, and is recorded at LBN=83 and LBN=85 in FIG. 25.
FIG. 30 shows an example of a structure of the directory file recorded at LBN=85. The directory file is constructed with a plurality of file identifier descriptors, each of which has information concerning each file included in the directory. Major information possessed by each file identifier descriptor is a filename of the corresponding file and location information on the file entry.
The following describes an operation where the data recording/reproducing apparatus reads a desired file from a disc having the above-described UDF file system structure. FIG. 31 shows a logical structure of a directory/file in the file management information conforming to the UDF specification.
In FIG. 31, a file set descriptor is recorded at a predetermined location in the partition space as a part of the file management information. In the file set descriptor, a recording location of a file entry for a ROOT directory file is stored. In the file identifier descriptor in the ROOT directory file, a recording location of a file entry of a directory DIR1 is stored. In a file in the directory DIR1, a plurality of file identifier descriptors are present, each of which stores filenames of FILE1_1 and FILE1_2 and recording locations of their file entries.
The following describes an operation for attempting to acquire a recording location of a target file from the hierarchical structure shown in FIG. 31. Here, it is assumed that the file FILE1_1 is the target file.
Firstly, reference is made to a file set descriptor, from which a location of the file entry of the ROOT directory is acquired.
Next, an allocation descriptor is read from the file entry, so that the location and the length of the extent of the ROOT directory file are obtained, thus reading data of the ROOT directory file. By scanning the thus obtained information on the ROOT directory file, a file identifier descriptor matching “DIR1”, which is the directory name of the target, can be detected.
When the file identifier descriptor matching the target directory is detected, then location information on the file entry is obtained from the contents of the file identifier descriptor, while reading the file entry.
Further, an allocation descriptor is read from such a file entry, so that the location and the length of the extent recorded in there are obtained, thus reading data on the directory file.
Then, by scanning the read data of the directory DIR1, a file identifier descriptor matching “FILE1_1”, which is a filename of the target, is detected. When the file identifier descriptor matching the target directory is detected, then location information on the file entry is obtained from such a file identifier descriptor, while reading the file entry.
Finally, an allocation descriptor is read from the file entry, so that the location and the length of the extent recorded in there are obtained, thus reading data of the FILE1_1 as the target file.
Next, the following describes an operation where the data recording/reproducing apparatus records data on a disc having a structure according to the UDF file system. The following description deals with a case where FILE1_3 is recorded further under the directory DIR1 with respect to a disc having the partition space shown in FIG. 32.
Firstly, a space bitmap is scanned so that a logical block having a bit value of “1” indicating an unallocated state is obtained. With respect to the unallocated state logical block, data of the FILE1_3 is recorded as an extent. When the recording of the extent is completed, then a file entry indicating the FILE1_3 is recorded with respect to the unallocated logical block.
In this step, location information and a length of the extent indicating the FILE1_3 are recorded in the file entry as allocation descriptors in a required number. In a file of the directory DIR1 as a parent directory of the FILE1_3 a file identifier descriptor indicating the FILE1_3 is recorded.
In this file identifier descriptor, a filename of the FILE1_3 and location information of the file entry are recorded. Then, a bit in the space bitmap corresponding to the sector that was allocated as a result of the above process is set at 0, which indicates an allocated state.
As a result of the above-described process, the logical volume space becomes as shown in FIG. 32. It should be noted that the order of the processing for dealing with the file management information is not limited especially to the above-described example, but a process in the other orders may be carried out.
However, the above-described file management method using the UDF specification has the following problems.
First, according to the UDF specification, a directory is recorded in a partition space as a file, and a file entry also is recorded in the partition space. Therefore, the directory file and file entry might be arranged in a dispersed manner on the disc.
Thus, in the case of attempting to read all files existing under a directory, if a directory file and a file entry are arranged in a dispersed manner, a seek operation with respect to the disc would be generated frequently.
For example, in FIG. 32 also, each of the file entries of FILE1_1, FILE1_2 and FILE1_3 are arranged in a dispersed manner, so that a seek operation is essential for reading these file entries. In such a situation, if a file to be reproduced is a file that requires real time reproduction, such as an AV file, the frequent seek operation would make smooth reproduction difficult.
Similarly, if real time recording is required as in the case of an AV file or the like, when recording the file entry after AV data itself is recorded, a seek operation would be generated with respect to the disc, which interrupts the AV data recording during the seek operation.
In addition, at the time of activating the apparatus, it can be considered that the number of seek operations with respect to the disc can be reduced by performing an on-memory processing by reading all file management information into a memory. However, a lot of seek operations are generated in such a process also, and therefore it would take a long time to activate the apparatus itself. Furthermore, since it is difficult to estimate the required memory capacity in advance, an architecture of a system for arranging computing resources efficiently also becomes difficult.